This page last changed on Jul 24, 2006 by stephen fenech.

Mule Endpoint URIs are any valid URI and describes how to connect to the underlying transport. Most connectors in Mule can be created from an endpoint uri except where not enough connection information can be expressed clearly in a URI, such as jms connection properties. Endpoint URIs are set on Mule Endpoints which manage other connection instance information such as filters and transactions.

Mule Endpoint URIs they usually in one of the following forms, though other provider implementations can introduce their own schemes.

scheme://[host][:port]/[endpoint name]/[address]?[params]


The scheme must always be set. The host and port are set for enpoints that use unwrapped socket based communications such as the tcp, udp, http or multicast.

udp://localhost:65432

If host and port are set it is unlikely that a provider would be set though by setting the provider name would cause a specific provider to be used with the host and port.

tcp://localhost:3212/myTcpEndpoint

This would use the pre-configured endpoin myTcpEndpoint using tcp://localhost:3212 as the endpoint URI.

scheme://[endpoint name]/[address]?[params]


The endpointname is a preconfigured endpoint to use. Endpoints can be local to the component or global and visible to all components in the container. Endpoints are configuration objects that group a connector, transformers and an endpoint URI together along with filter and transaction information. For more information see Mule Endpoints.

jms://jmsEndpoint/test.queue

The URI specifies that a pre-configured endpoint called jmsEndpoint should be used and the address on the endpoint should be set to 'test.queue'. If you want to use the endpoint 'as is' just omit the address but leave the tailing forward slash i.e.

jms://jmsEndpoint/

scheme://[username][:password]@[host][:port]?[params]

The user name and password are used to log in to the remote server specified by the host and port params. The pop3 and smtp connectors use this sort or uri.

pop3://ross:[email protected]
smtp://ross:[email protected]


scheme://[address]?[params]


Here we only define a protocol and an address. This tells mule to go and get a connector that handles the specified scheme or create one if needed, create a new endpoint and use the specified address.

vm://my.queue

URI Parameters

So far we haven't talked about the params on the URI. There are two types of params that can be set -

  1. Known mule params that control the way the endpoint is configured, such as whether to force a connector to be created or to specify transformers for the endpoint.
  2. Properties to be set on the connector or to be associated with the provider. This allows you to set properties on a connector used by this endpoint. Additionally, all properties will be associated with the provider, so you can mix connector and provider properties. If you haven't already, I recommend having a look at Mule Endpoints for more infomation.

Known Parameters

Property Description
createConnector Determines if the connector for this endpoint should be created. possible values are-

* IF_NEEDED - (default) will create the connector if there is no other configured on the MuleManager for this protocol
* ALWAYS - Always create a new connector for this endpoint
* NEVER - do not create a connector and throw a ConnectorFactoryException if there is no connector configured for the uri protocol.
connector The name of an existing connector to use for this Endpoint URI
transformers Defines a comma separated list of transformers to configure on the endpoint
endpointName Some endpoints such as file:// cannot use the above notation for specifying a provider name in the path. In such cases this parameter can be used. If an endpoint is generated from a URI with this parameter, the name of the endpoint will be set to this value
 address  Specifying an address param will explicitly set the endpoint address to that value and ignore all other info in the URI.

file:///C:/temp?endpointName=myFileEndpoint&transformers=FileToString,XmlToDom
udp://localhost:38543?createConnector=ALWAYS
jms://jmsEndpoint/topic:my.topic?createConnector=NEVER

Other Parameters

Any other parameters set on the URI will be set on the connector if a connector is created and also set on the endpoint itself as properties.

Custom Endpoints

Each connector can define its own EndpointBuilder. This builder is used by the MuleEndpointURI to compose the uri into an endpoint that the connector understands. There are default EndpointBuilder implementations that most connectors can use, such as socket, resource name and URL builders, plus there are special cases such as file urls where the provider cannot be expressed in the uri path.

Endpoint Encoding

When using Xml configuration certain character entities defined in the W3C SGML specification need to be escaped to their SGML code. The most relevant are listed here. Don't forget to remove the space before the ';'.

Text code Numerical code What it looks like Description, extras
&quot ; #34 " quotation mark = APL quote, U+0022 ISONEW
&amp ; #38 & ampersand, U+0026 ISOnum
&lt ; #60 < less-than sign, U+003C ISOnum
&gt ; #62 > greater-than sign, U+003E ISOnum
Document generated by Confluence on Nov 27, 2006 10:27